package com.healthcloud.service.patient.impl;

import com.healthcloud.dao.patient.BoneLooseScoreDao;
import com.healthcloud.entity.patient.BoneLooseScoreEntity;
import com.healthcloud.service.patient.BoneLooseScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

import com.healthcloud.utils.PageParam;
import org.springframework.transaction.annotation.Transactional;



@Service("boneLooseScoreService")
@Transactional
public class BoneLooseScoreServiceImpl implements BoneLooseScoreService {
	@Autowired
	private BoneLooseScoreDao boneLooseScoreDao;
	
	@Override
	public BoneLooseScoreEntity queryObject(Integer id){
		return boneLooseScoreDao.queryObject(id);
	}
	
	@Override
	public List<BoneLooseScoreEntity> queryList(BoneLooseScoreEntity bean, PageParam pageParam){
		return boneLooseScoreDao.queryList(bean, pageParam);
	}
	
	@Override
	public int queryTotal(BoneLooseScoreEntity bean){
		return boneLooseScoreDao.queryTotal(bean);
	}
	
	@Override
	public void save(BoneLooseScoreEntity boneLooseScore){
		boneLooseScoreDao.save(boneLooseScore);
	}
	
	@Override
	public void update(BoneLooseScoreEntity boneLooseScore){
		boneLooseScoreDao.update(boneLooseScore);
	}
	
	@Override
	public void delete(Integer id){
		boneLooseScoreDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		boneLooseScoreDao.deleteBatch(ids);
	}

	@Override
	public void saveOrUpdate(BoneLooseScoreEntity entity) {
		if (entity.getId()==null){
			boneLooseScoreDao.save(entity);
		}else {
			boneLooseScoreDao.update(entity);
		}
	}

	@Override
	public BoneLooseScoreEntity queryOne(BoneLooseScoreEntity entity) {
		return boneLooseScoreDao.queryOne(entity);
	}
}
